<div class="row-fluid listcontent">
    <div class="span12">
        <div class="portlet box grey">
            <div class="portlet-title">
                <div class="caption"><i class="icon-cogs"></i>狗狗列表</div>
                <div class="actions" id="orderaline">
                    <div class="btn-group">
                        <a class="btn blue" href="#" data-toggle="dropdown">
                            <i class="icon-cogs"></i>&nbsp;&nbsp;操作
                            <i class="icon-angle-down"></i>
                        </a>
                        <ul class="dropdown-menu pull-right">
                            <li><a id="info_delete"><i class="icon-trash"></i>删除狗狗</a></li>
<!--                            <li><a id="info_forbidden"><i class="icon-lock"></i>禁用用户</a></li>-->
<!--                            <li><a id="info_recovery"><i class="icon-unlock"></i>恢复用户</a></li>-->
                        </ul>
                    </div>
                    <div class="btn-group">
                        <a class="btn blue Download" href="javascript:void(0)" data-toggle="dropdown">
                            <i class="icon-cogs"></i>&nbsp;&nbsp;导出狗狗信息
                        </a>

                    </div>
                </div>
            </div>
            <div class="portlet-body">
                <div class="dataTables_wrapper form-inline">
                    <div class="row-fluid">
                        <div class="span12">
                            <form id="searchform" action="{$action}" method="post">
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <label>
                                        <input type="button" class="btn blue searchsubmit" value="狗的体型: "/>
                                        <select name='search[]' style="width: 80px;margin-right: 10px">
                                            <option value="-2">全部</option>
                                            <?php foreach ($udf_size as $key => $vo) { ?>
                                                <option value="{$key}"
                                                    <?php if (isset($search[0]) && ($search[0] == $key)) { ?>
                                                        selected="selected"
                                                    <?php } ?> >
                                                    {$vo}
                                                </option>
                                            <?php } ?>
                                        </select>
                                    </label>
                                </div>

                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <input type="button" class="btn blue searchsubmit" value="狗的年龄:  "/>
                                    <select name='search[]' style="width: 90px;margin-right: 10px">
                                        <option value="-2">全部</option>
                                        <?php foreach ($udf_age as $key => $vo) { ?>
                                            <option value="{$key}"
                                                <?php if (isset($search[1]) && ($search[1] == $key)) { ?>
                                                    selected="selected"
                                                <?php } ?> >
                                                {$vo}
                                            </option>
                                        <?php } ?>
                                    </select>
                                </div>

                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <input type="button" class="btn blue searchsubmit" value="狗的性别:  "/>
                                    <select name='search[]' style="width: 80px;margin-right:10px">
                                        <option value="-2">全部</option>
                                        <?php foreach ($udf_sex as $key => $vo) { ?>
                                            <option value="{$key}"
                                                <?php if (isset($search[2]) && ($search[2] == $key)) { ?>
                                                    selected="selected"
                                                <?php } ?> >
                                                {$vo}
                                            </option>
                                        <?php } ?>
                                    </select>
                                </div>

                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <input type="button" class="btn blue searchsubmit" value="狗的状况:  "/>
                                    <select name='search[]' style="width: 80px;margin-right: 10px">
                                        <option value="-2">全部</option>
                                        <?php foreach ($udf_condition as $key => $vo) { ?>
                                            <option value="{$key}"
                                                <?php if (isset($search[3]) && ($search[3] == $key)) { ?>
                                                    selected="selected"
                                                <?php } ?> >
                                                {$vo}
                                            </option>
                                        <?php } ?>
                                    </select>
                                </div>
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <label>
                                        <input type="button" class="btn blue searchsubmit" value="搜索:"/>
                                        <input type="text" name="search[]" placeholder="狗的名称"
                                               aria-controls="sample_2" class="m-wrap" value="{$search[4]?$search[4]:''}" style="height:20px"/>
                                    </label>
                                </div>
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <input type="button" class="btn blue searchsubmit" value="省:  "/>
                                    <select name='search[]' id="province" style="width: 100px;margin-right: 10px">
                                        <option value="-2">全部</option>
                                        <?php foreach ($province as $key => $vo) { ?>
                                            <option value="{$vo['district_id']}"
                                                <?php if (isset($search[5]) && ($search[5] == $vo['district_id'])) { ?>
                                                    selected="selected"
                                                <?php } ?> >
                                                {$vo.district}
                                            </option>
                                        <?php } ?>
                                    </select>
                                </div>
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <input type="button" class="btn blue searchsubmit" value="市:  "/>
                                    <select name='search[]' id="city" style="width: 100px;margin-right: 10px">
                                        <option value="-2">全部</option>
                                        <?php foreach ($city as $key => $vo) { ?>
                                            <option value="{$vo['district_id']}"
                                                <?php if (isset($search[6]) && ($search[6] == $vo['district_id'])) { ?>
                                                    selected="selected"
                                                <?php } ?> >
                                                {$vo.district}
                                            </option>
                                        <?php } ?>
                                    </select>
                                </div>
                                <div class="dataTables_filter" id="sample_2_filter" style="float: left">
                                    <input type="button" class="btn blue searchsubmit" value="区:  "/>
                                    <select name='search[]' id="area" style="width: 100px;margin-right: 10px">
                                        <option value="-2">全部</option>
                                        <?php foreach ($district as $key => $vo) { ?>
                                            <option value="{$vo['district_id']}"
                                                <?php if (isset($search[7]) && ($search[7] == $vo['district_id'])) { ?>
                                                    selected="selected"
                                                <?php } ?> >
                                                {$vo.district}
                                            </option>
                                        <?php } ?>
                                    </select>
                                </div>
                            </form>
                        </div>
                    </div>
                    <table id="basicinfo" class="table table-hover table-bordered">
                        <thead>
                        <th style="width:8px;"><input type="checkbox"/></th>
                        <th>ID</th>
                        <th>用户ID</th>
                        <th>狗的名字</th>
                        <th>狗的主人</th>
                        <th>时间</th>
                        <th>省</th>
                        <th>市</th>
                        <th>区</th>
                        <th>狗的状况</th>
                        <th>狗的性别</th>
                        <th>狗的体型</th>
                        <th>狗的年龄</th>
                        <th>狗的性格</th>
                        <th>注射狂犬疫苗</th>
                        <th>体外驱虫</th>
                        <th>体内驱虫</th>
                        <th>绝育</th>
                        <th>残疾</th>
                        <th style="width:110px;">操作</th>
                        </thead>
                        <tbody>
                        {if(count($list)>0)}
                        {volist name='list' id='val'}
                        <tr class="odd gradeX ">
                            <td><input type="checkbox" class="checkboxes" name="id" value="{$val.udf_id}"/></td>
                            <td>{$val.udf_id}</td>
                            <td>{$val.user_id}</td>
                            <td>{$val.udf_name}</td>
                            <td>{$val.user_username}</td>
                            <td>{$val.udf_datetime}</td>
                            <td>{$val.province}</td>
                            <td>{$val.city}</td>
                            <td>{$val.district}</td>
                            <td>{$udf_condition[$val.udf_condition]?$udf_condition[$val.udf_condition]:''}</td>
                            <td>{$udf_sex[$val.udf_sex]}</td>
                            <td>{$udf_size[$val.udf_size]?$udf_size[$val.udf_size]:''}</td>
                            <td>{$udf_age[$val.udf_age]}</td>
                            <td>{$val.udskca_name}</td>
                            <td>{$udf_dog_vaccine[$val.udf_dog_vaccine]?$udf_dog_vaccine[$val.udf_dog_vaccine]:''}</td>
                            <td>{$udf_dog_outside[$val.udf_dog_outside]?$udf_dog_outside[$val.udf_dog_outside]:''}</td>
                            <td>{$udf_dog_inside[$val.udf_dog_inside]?$udf_dog_inside[$val.udf_dog_inside]:''}</td>
                            <td>{$udf_dog_sterilization[$val.udf_dog_sterilization]?$udf_dog_sterilization[$val.udf_dog_sterilization]:''}</td>
                            <td>{$udf_dog_disability[$val.udf_dog_disability]?$udf_dog_disability[$val.udf_dog_disability]:''}</td>
                            <td>
                                <a class="btn mini purple detail" data-id='{$val.udf_id}'><span>详情</span></a>
                            </td>
                        </tr>
                        {/volist}
                        {else/}
                        <tr>
                            <td colspan="16"><span style="margin-left: 50px">暂无数据</span></td>
                        </tr>
                        {/if}
                        </tbody>
                    </table>
                    <input type="hidden" name="page" value="{$page?$page:''}">
                </div>
            </div>
        </div>
        {if(!empty($list))}
        {$list->render()}
        {/if}
    </div>
</div>